<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div class="box">
        <p class="head">京东秒杀倒计时</p>
        <p class="section"> <span>秒</span><span>杀</span></p>
        <div class="cate">
            <p class="one"></p>天
            <p class="one"></p>时
            <p class="one"></p>分
            <p class="one"></p>秒
        </div>
    </div>
</body>
<style>
    * {
        margin: 0;
        padding: 0;
    }

    .box {
        width: 260px;
        height: 400px;
        background-color: red;
        margin: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .head {
        font-size: 25px;
        width: 100%;
        text-align: center;
        margin-top: 30px;
    }

    .section {
        width: 50px;
        height: 100px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        margin-top: 50px;
        font-size: 30px;
    }
    .one{
        width: 30px;
        height: 30px;
        background-color: white;
        border: 1px solid;
        text-align: center;
        line-height: 30px;
    }
    .cate{
        width: 80%;
        display: flex;
        justify-content: space-around;
        align-items: center;
        margin: 100px;
    }
</style>

</html>

<script>
    
    // function fn(){
    //     let jiang = +new Date('2022/10/31 24:00:00')
    //     let  xian= +new Date()
    //     let cha = jiang -xian
    //     let day = parseInt(cha/1000/60/60/24)
    //     day=day>=10?day:'0'+day
    //     let Hour = parseInt(cha/1000/60/60%24)
    //     Hour=Hour>=10?Hour:'0'+Hour
    //     let fen = parseInt(cha/1000/60%60)
    //     fen=fen>=10?fen:'0'+fen
    //     let miao = parseInt(cha/1000%60)
    //     miao=miao>=10?miao:'0'+miao
    //     let one = document.querySelectorAll('.one')
    //     one[0].innerHTML=day
    //     one[1].innerHTML=Hour
    //     one[2].innerHTML=fen
    //     one[3].innerHTML=miao
    // }
    // fn()
    // setInterval(fn,1000)
</script>